//
//  ResultController.m
//  Tables
//
//  Created by mathias Muller on 8/31/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "ResultController.h"
#import "Challenge.h"

@implementation ResultController
@synthesize mainTitle, timeLabel;

- (void) displayResult:(Challenge *) challenge {
	self.navigationItem.hidesBackButton = YES;
	NSString * t = @"Sorry !";
	if([challenge isCorrect]) {
		t = @"Congratulation !";
	}

	mainTitle.text = t;
	timeLabel.text = [NSString stringWithFormat:@"%3$f s", challenge.timeTaken];
}
@end
